﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Admin.aspx.cs" Inherits="TouristAgencyAsp.Admin" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Label ID="Label1" runat="server" Text="Find by Id: "></asp:Label>
    <asp:TextBox ID="resIdTxt" runat="server"></asp:TextBox>
    <asp:RangeValidator ID="RangeValidatorAge" runat="server"
                ErrorMessage="Invalid Reservation Id" 
                ControlToValidate="resIdTxt"
                Display="Dynamic"
                ForeColor="Red"
                Type="Integer"
                MinimumValue="0"
                MaximumValue="9999">
             </asp:RangeValidator>  
    <asp:Button ID="searchBtn" runat="server" Text="Search" 
        onclick="searchBtn_Click" />
    <br />
    <br />
    <asp:Repeater ID="reservationsRepeater" runat="server">
        <ItemTemplate>
            <div class="itemTemp">
                <div class="info">
                    <b>Reservation Id: <%# Eval("ReservationId") %></b>           
                    <br />
                    Reservation Type: <%# Eval("ReservationType.ReservationType1") %></b>
                    <br />
                    Total price: <%# Eval("TotalPrice", "{0:c}") %>
                    <br />
                </div>

                <div class="buttons">
                    <div class="button"><a href="MakePayment.aspx?resId=<%# Eval("ReservationId") %>">Make payment</a></div>
                </div>       
            </div>  
        </ItemTemplate>
    </asp:Repeater>  
</asp:Content>
